//
//  COStreamerCollectionCell.swift
//  CocoProject
//
//  Created by Vill on 2023/11/15.
//

import UIKit

class COStreamerCollectionCell: UICollectionViewCell {
    
    var photoModel = ProfilePhotosModel(){
        didSet {
            setContents()
        }
    }
    
    func setContents(){
        self.iconView.sd_setUrlImage(photoModel.aliWorksUrl, placeholder: KImaged("coco_pic_holder"))
    }
    
    lazy var iconView : UIImageView = {
        let icon = UIImageView()
        icon.contentMode = .scaleAspectFill
        icon.layer.masksToBounds = true
        return icon
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.layer.cornerRadius = PTW(4)
        self.layer.masksToBounds = true
        setupUI()
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        contentView.addSubview(iconView)
        iconView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }
    
}
